<template>
<div class="container tc-wrap">
    <div class="tc-content">
        <i class="iconfont" @click="doBack()">&#xe62f;</i>
        <span class="tc-title">{{title}}</span>
        <i class="iconfont" @click="goShoppingCart()">&#xe618;</i>
    </div>
</div>  
</template>

<script>
export default {
    methods:{
        doBack(){
            this.$router.go(-1);
        },
        goShoppingCart(){
            //进入购物车
            this.$router.push({name:"ShoppingCart"})
        }
    },
    computed:{
        title(){
            return this.$route.params.title
        }
    }
}
</script>

<style lang="less">
    .tc-wrap{
        position: flex;
        top:0;
        left:0;
        height:0.8rem;
        border-bottom: 1px solid #ccc;
        >.tc-content{
            height: 100%;
            display: flex;
            align-items: center;
            text-align: center;
            >i{
                flex-grow: 2;
                font-weight: 800;
                color:#bbb;
                font-size: 0.4rem;
                
                
            }
            >span{
                flex-grow: 6;
                font-size: 0.35rem;
                color: #5e5e5e;
                font-weight: 800;
            }
        }
    }

</style>




